package cn.stylefeng.guns.modular.course.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;
import java.io.Serializable;
import java.util.List;

/**
 * <p>
 * 
 * </p>
 *
 * @author 唐元鹏
 * @since 2021-02-24
 */
@Data
@TableName("yy_category")
public class Category implements Serializable {

    private static final long serialVersionUID=1L;

      @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @TableField("name")
    private String name;

      @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;

      @TableField(value = "create_user", fill = FieldFill.INSERT)
    private Long createUser;

    @TableField("pid")
    private Integer pid;

    @TableLogic
    @TableField("del_flag")
    private String delFlag;

    @TableField("sort")
    private Integer sort;


    @TableField(exist = false)
    private List<Course> courseList;



    @Override
    public String toString() {
        return "Category{" +
        "id=" + id +
        ", name=" + name +
        ", createTime=" + createTime +
        ", createUser=" + createUser +
        ", pid=" + pid +
        "}";
    }
}
